using UnityEngine;
using System.Collections;
using System.Threading;
using System;

public class theScript : MonoBehaviour
{
    
    int frameCount = 0;
    //change value of printCount to adjust how often data is pushed
    int printCount = 10;
    
    //create lock for thread safety
    private static object locker = new object();

    void Start()
    {

    }
    class Logging
    {
       public UnityEngine.Vector3 location;
       public UnityEngine.Quaternion rotation;
       public UnityEngine.Vector3 scale;
       public string name;

    }
    //create new instance of the Logging class
    Logging newLog = new Logging();

    // Update is called once per frame
    void Update()
    {
        //every frame increment frameCount by 1, if frameCount is equal to printCount, push data to Logging class
        frameCount++;
        if (frameCount == printCount)
        {
          push();
         
          
        }
    }
    public void push()
    {
      
        //saves the position, scale, rotation, and name to the Logging class
            newLog.location = transform.position;
            newLog.rotation = transform.rotation;
            newLog.scale = transform.localScale;
            newLog.name = transform.name;
            Console.WriteLine(newLog.location);
            
        
    }


}